﻿using System;
using System.Collections.Generic;
//using System.Linq;
using System.Text;

namespace ExtensionsExcercise
{
    public static class StringBuilderExtensions
    {
        public static StringBuilder Substring(this StringBuilder builder, int index, int length)
        {
            StringBuilder substring = new StringBuilder(length);

            for (int i = 0; i < length; i++)
            {
                char ch = builder[index + i];
                substring.Append(ch);
            }

            return substring;
        }
    }
}
